//
//  GradeModel.m
//  HTT
//
//  Created by admin on 15/11/25.
//  Copyright © 2015年 nit. All rights reserved.
//

#import "GradeModel.h"
#define kGradeId @"GradeIdKey"
#define kGradeName @"GradeNameKey"
@implementation GradeModel
- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:_gradeId forKey:kGradeId];
    [aCoder encodeObject:_gradeName forKey:kGradeName];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        _gradeName = [aDecoder decodeObjectForKey:kGradeName];
        _gradeId   = [aDecoder decodeObjectForKey:kGradeId];
    }
    return self;
}

#pragma mark - NSCoping
- (id)copyWithZone:(NSZone *)zone {
    GradeModel *copy = [[[self class] allocWithZone:zone] init];
    //    copy.name = [self.name copyWithZone:zone];
    copy.gradeId = [self.gradeId copyWithZone:zone];
    copy.gradeName = [self.gradeName copyWithZone:zone];
    return copy;
}
@end
